//
//  Users.m
//  addressBook
//
//  Created by apple on 15/8/20.
//  Copyright (c) 2015年 戴维营. All rights reserved.
//

#import "Users.h"

@implementation Users

- (instancetype)initWithName:(NSString *)name sex:(NSString *)sex company:(NSString *)company phoneNumber:(NSString *)phoneNumber letterBox:(NSString *)letterBox weiXin:(NSString *)weiXin position:(NSString *)position
{
    
    _name = name;
    _sex = sex;
    _company = company;
    _phoneNumber = phoneNumber;
    _letterBox = letterBox;
    _weiXin = weiXin;
    _position = position;
   
    return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super init])
    {
        self.name = [aDecoder decodeObjectForKey:@"name"];
        self.sex = [aDecoder decodeObjectForKey:@"sex"];
        self.position = [aDecoder decodeObjectForKey:@"position"];
        self.company = [aDecoder decodeObjectForKey:@"company"];
        self.phoneNumber = [aDecoder decodeObjectForKey:@"phoneNumber"];
        self.letterBox = [aDecoder decodeObjectForKey:@"letterBox"];
        self.weiXin = [aDecoder decodeObjectForKey:@"weiXin"];
    }
    return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:_name forKey:@"name"];
    [aCoder encodeObject:_sex forKey:@"sex"];
    [aCoder encodeObject:_company forKey:@"company"];
    [aCoder encodeObject:_phoneNumber forKey:@"phoneNumber"];
    [aCoder encodeObject:_letterBox forKey:@"letterBox"];
    [aCoder encodeObject:_weiXin forKey:@"weiXin"];
    [aCoder encodeObject:_position forKey:@"position"];
}

@end
